Optimal. Leaf size=685 \[ \frac {B (d x)^{2+m} \left (b^2-2 a c+b c x^2\right )}{2 a \left (b^2-4 a c\right ) d^2 \left (a+b x^2+c x^4\right )}+\frac {(d x)^{1+m} \left (A \left (b^2-2 a c\right )-a b C+c (A b-2 a C) x^2\right )}{2 a \left (b^2-4 a c\right ) d \left (a+b x^2+c x^4\right )}+\frac {c \left (2 a C \left (2 b-\sqrt {b^2-4 a c} (1-m)\right )+A \left (b^2 (1-m)+b \sqrt {b^2-4 a c} (1-m)-4 a c (3-m)\right )\right ) (d x)^{1+m} \, _2F_1\left (1,\frac {1+m}{2};\frac {3+m}{2};-\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}\right )}{2 a \left (b^2-4 a c\right )^{3/2} \left (b-\sqrt {b^2-4 a c}\right ) d (1+m)}-\frac {c \left (2 a C \left (2 b+\sqrt {b^2-4 a c} (1-m)\right )+A \left (b^2 (1-m)-b \sqrt {b^2-4 a c} (1-m)-4 a c (3-m)\right )\right ) (d x)^{1+m} \, _2F_1\left (1,\frac {1+m}{2};\frac {3+m}{2};-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}\right )}{2 a \left (b^2-4 a c\right )^{3/2} \left (b+\sqrt {b^2-4 a c}\right ) d (1+m)}-\frac {B c \left (4 a c (2-m)+b \left (b+\sqrt {b^2-4 a c}\right ) m\right ) (d x)^{2+m} \, _2F_1\left (1,\frac {2+m}{2};\frac {4+m}{2};-\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}\right )}{2 a \left (b^2-4 a c\right )^{3/2} \left (b-\sqrt {b^2-4 a c}\right ) d^2 (2+m)}+\frac {B c \left (4 a c (2-m)+b \left (b-\sqrt {b^2-4 a c}\right ) m\right ) (d x)^{2+m} \, _2F_1\left (1,\frac {2+m}{2};\frac {4+m}{2};-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}\right )}{2 a \left (b^2-4 a c\right )^{3/2} \left (b+\sqrt {b^2-4 a c}\right ) d^2 (2+m)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 1.58, antiderivative size = 670, normalized size of antiderivative = 0.98, number of steps
used = 10, number of rules used = 6, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {1676, 1291,
1299, 371, 12, 1135} \begin {gather*} \frac {c (d x)^{m+1} \left (A \left (b (1-m) \sqrt {b^2-4 a c}-4 a c (3-m)+b^2 (1-m)\right )+2 a C \left (2 b-(1-m) \sqrt {b^2-4 a c}\right )\right ) \, _2F_1\left (1,\frac {m+1}{2};\frac {m+3}{2};-\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}\right )}{2 a d (m+1) \left (b^2-4 a c\right )^{3/2} \left (b-\sqrt {b^2-4 a c}\right )}-\frac {c (d x)^{m+1} \left (-(1-m) \sqrt {b^2-4 a c} (A b-2 a C)-4 a A c (3-m)+4 a b C+A b^2 (1-m)\right ) \, _2F_1\left (1,\frac {m+1}{2};\frac {m+3}{2};-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}\right )}{2 a d (m+1) \left (b^2-4 a c\right )^{3/2} \left (\sqrt {b^2-4 a c}+b\right )}+\frac {(d x)^{m+1} \left (A \left (b^2-2 a c\right )+c x^2 (A b-2 a C)-a b C\right )}{2 a d \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac {B c (d x)^{m+2} \left (b m \left (\sqrt {b^2-4 a c}+b\right )+4 a c (2-m)\right ) \, _2F_1\left (1,\frac {m+2}{2};\frac {m+4}{2};-\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}\right )}{2 a d^2 (m+2) \left (b^2-4 a c\right )^{3/2} \left (b-\sqrt {b^2-4 a c}\right )}+\frac {B c (d x)^{m+2} \left (b m \left (b-\sqrt {b^2-4 a c}\right )+4 a c (2-m)\right ) \, _2F_1\left (1,\frac {m+2}{2};\frac {m+4}{2};-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}\right )}{2 a d^2 (m+2) \left (b^2-4 a c\right )^{3/2} \left (\sqrt {b^2-4 a c}+b\right )}+\frac {B (d x)^{m+2} \left (-2 a c+b^2+b c x^2\right )}{2 a d^2 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 371
Rule 1135
Rule 1291
Rule 1299
Rule 1676
Rubi steps
\begin {align*} \int \frac {(d x)^m \left (A+B x+C x^2\right )}{\left (a+b x^2+c x^4\right )^2} \, dx &=\frac {\int \frac {B (d x)^{1+m}}{\left (a+b x^2+c x^4\right )^2} \, dx}{d}+\int \frac {(d x)^m \left (A+C x^2\right )}{\left (a+b x^2+c x^4\right )^2} \, dx\\ &=\frac {(d x)^{1+m} \left (A \left (b^2-2 a c\right )-a b C+c (A b-2 a C) x^2\right )}{2 a \left (b^2-4 a c\right ) d \left (a+b x^2+c x^4\right )}-\frac {\int \frac {(d x)^m \left (-A b^2 (1-m)+2 a A c (3-m)-a b C (1+m)-c (A b-2 a C) (1-m) x^2\right )}{a+b x^2+c x^4} \, dx}{2 a \left (b^2-4 a c\right )}+\frac {B \int \frac {(d x)^{1+m}}{\left (a+b x^2+c x^4\right )^2} \, dx}{d}\\ &=\frac {B (d x)^{2+m} \left (b^2-2 a c+b c x^2\right )}{2 a \left (b^2-4 a c\right ) d^2 \left (a+b x^2+c x^4\right )}+\frac {(d x)^{1+m} \left (A \left (b^2-2 a c\right )-a b C+c (A b-2 a C) x^2\right )}{2 a \left (b^2-4 a c\right ) d \left (a+b x^2+c x^4\right )}-\frac {B \int \frac {(d x)^{1+m} \left (2 a c (2-m)+b^2 m+b c m x^2\right )}{a+b x^2+c x^4} \, dx}{2 a \left (b^2-4 a c\right ) d}-\frac {\left (c \left (4 a b C+A b^2 (1-m)-\sqrt {b^2-4 a c} (A b-2 a C) (1-m)-4 a A c (3-m)\right )\right ) \int \frac {(d x)^m}{\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+c x^2} \, dx}{4 a \left (b^2-4 a c\right )^{3/2}}+\frac {\left (c \left (4 a b C+A b^2 (1-m)+\sqrt {b^2-4 a c} (A b-2 a C) (1-m)-4 a A c (3-m)\right )\right ) \int \frac {(d x)^m}{\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+c x^2} \, dx}{4 a \left (b^2-4 a c\right )^{3/2}}\\ &=\frac {B (d x)^{2+m} \left (b^2-2 a c+b c x^2\right )}{2 a \left (b^2-4 a c\right ) d^2 \left (a+b x^2+c x^4\right )}+\frac {(d x)^{1+m} \left (A \left (b^2-2 a c\right )-a b C+c (A b-2 a C) x^2\right )}{2 a \left (b^2-4 a c\right ) d \left (a+b x^2+c x^4\right )}+\frac {c \left (4 a b C+A b^2 (1-m)+\sqrt {b^2-4 a c} (A b-2 a C) (1-m)-4 a A c (3-m)\right ) (d x)^{1+m} \, _2F_1\left (1,\frac {1+m}{2};\frac {3+m}{2};-\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}\right )}{2 a \left (b^2-4 a c\right )^{3/2} \left (b-\sqrt {b^2-4 a c}\right ) d (1+m)}-\frac {c \left (4 a b C+A b^2 (1-m)-\sqrt {b^2-4 a c} (A b-2 a C) (1-m)-4 a A c (3-m)\right ) (d x)^{1+m} \, _2F_1\left (1,\frac {1+m}{2};\frac {3+m}{2};-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}\right )}{2 a \left (b^2-4 a c\right )^{3/2} \left (b+\sqrt {b^2-4 a c}\right ) d (1+m)}+\frac {\left (B c \left (4 a c (2-m)+b \left (b-\sqrt {b^2-4 a c}\right ) m\right )\right ) \int \frac {(d x)^{1+m}}{\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+c x^2} \, dx}{4 a \left (b^2-4 a c\right )^{3/2} d}-\frac {\left (B c \left (4 a c (2-m)+b \left (b+\sqrt {b^2-4 a c}\right ) m\right )\right ) \int \frac {(d x)^{1+m}}{\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+c x^2} \, dx}{4 a \left (b^2-4 a c\right )^{3/2} d}\\ &=\frac {B (d x)^{2+m} \left (b^2-2 a c+b c x^2\right )}{2 a \left (b^2-4 a c\right ) d^2 \left (a+b x^2+c x^4\right )}+\frac {(d x)^{1+m} \left (A \left (b^2-2 a c\right )-a b C+c (A b-2 a C) x^2\right )}{2 a \left (b^2-4 a c\right ) d \left (a+b x^2+c x^4\right )}+\frac {c \left (4 a b C+A b^2 (1-m)+\sqrt {b^2-4 a c} (A b-2 a C) (1-m)-4 a A c (3-m)\right ) (d x)^{1+m} \, _2F_1\left (1,\frac {1+m}{2};\frac {3+m}{2};-\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}\right )}{2 a \left (b^2-4 a c\right )^{3/2} \left (b-\sqrt {b^2-4 a c}\right ) d (1+m)}-\frac {c \left (4 a b C+A b^2 (1-m)-\sqrt {b^2-4 a c} (A b-2 a C) (1-m)-4 a A c (3-m)\right ) (d x)^{1+m} \, _2F_1\left (1,\frac {1+m}{2};\frac {3+m}{2};-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}\right )}{2 a \left (b^2-4 a c\right )^{3/2} \left (b+\sqrt {b^2-4 a c}\right ) d (1+m)}-\frac {B c \left (4 a c (2-m)+b \left (b+\sqrt {b^2-4 a c}\right ) m\right ) (d x)^{2+m} \, _2F_1\left (1,\frac {2+m}{2};\frac {4+m}{2};-\frac {2 c x^2}{b-\sqrt {b^2-4 a c}}\right )}{2 a \left (b^2-4 a c\right )^{3/2} \left (b-\sqrt {b^2-4 a c}\right ) d^2 (2+m)}+\frac {B c \left (4 a c (2-m)+b \left (b-\sqrt {b^2-4 a c}\right ) m\right ) (d x)^{2+m} \, _2F_1\left (1,\frac {2+m}{2};\frac {4+m}{2};-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}}\right )}{2 a \left (b^2-4 a c\right )^{3/2} \left (b+\sqrt {b^2-4 a c}\right ) d^2 (2+m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 5 in
optimal.
time = 1.18, size = 242, normalized size = 0.35 \begin {gather*} \frac {x (d x)^m \left (A \left (6+5 m+m^2\right ) F_1\left (\frac {1+m}{2};2,2;\frac {3+m}{2};-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}},\frac {2 c x^2}{-b+\sqrt {b^2-4 a c}}\right )+(1+m) x \left (B (3+m) F_1\left (\frac {2+m}{2};2,2;\frac {4+m}{2};-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}},\frac {2 c x^2}{-b+\sqrt {b^2-4 a c}}\right )+C (2+m) x F_1\left (\frac {3+m}{2};2,2;\frac {5+m}{2};-\frac {2 c x^2}{b+\sqrt {b^2-4 a c}},\frac {2 c x^2}{-b+\sqrt {b^2-4 a c}}\right )\right )\right )}{a^2 (1+m) (2+m) (3+m)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \frac {\left (d x \right )^{m} \left (C \,x^{2}+B x +A \right )}{\left (c \,x^{4}+b \,x^{2}+a \right )^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.36, size = 57, normalized size = 0.08 \begin {gather*} {\rm integral}\left (\frac {{\left (C x^{2} + B x + A\right )} \left (d x\right )^{m}}{c^{2} x^{8} + 2 \, b c x^{6} + {\left (b^{2} + 2 \, a c\right )} x^{4} + 2 \, a b x^{2} + a^{2}}, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (d\,x\right )}^m\,\left (C\,x^2+B\,x+A\right )}{{\left (c\,x^4+b\,x^2+a\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________